package com.cloud.pole.shop.model.entity.order;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import org.hibernate.validator.constraints.NotEmpty;

import lombok.Data;

/**
 * @author 
 */
@Table(name="shop_order_refund")
@Data
public class ShopOrderRefund implements Serializable {
	/**
	 * 退款类型 1:退款 - 买家申请退款; 2:退款 - 商家主动退款; 3:退款 - 一键退款
	 */
	public static final int REFUND_TYPE_BUYER  = 1;
	public static final int REFUND_TYPE_SELLER = 2;
	public static final int REFUND_TYPE_ELSE   = 3;

	/**
	 * 方式:1：退货退款,2::仅退款
	 */
	public static final int REFUND_WAY_GOODS_REFUND = 1;
	public static final int REFUND_WAY_REFUND = 2;
	
	/**
	 * 退款状态（  1:买家已经申请退款，等待卖家同意; 10:卖家拒绝退款; 20:卖家已经同意退货，等待买家退货; 30:买家已经退货，等待卖家确认收货; 40:卖家未收到货,拒绝退款; 50:退款关闭; 60:退款成功）
	 */
	public static final int REFUND_STATUS_BUYER_APPLIED = 1;
	public static final int REFUND_STATUS_SELLER_REFUSE = 10;
	public static final int REFUND_STATUS_SELLER_AGREE = 20;
	public static final int REFUND_STATUS_BUYER_RETURNED_GOODS = 30;
	public static final int REFUND_STATUS_SELLER_NOT_RECEIVE_GOODS = 40;
	public static final int REFUND_STATUS_CLOSE = 50;
	public static final int REFUND_STATUS_SUCCESS = 60;

	/**
	 * 商家审核状态:0：未审核,-1：不同意,1:同意
	 */
	public static final int CHECK_STATUS_DEFAULT = 0;
	public static final int CHECK_STATUS_AGREE = 1;
	public static final int CHECK_STATUS_DISAGREE = -1;

	/**
	 * 退货状态:0：未收到,-1：不需退货,1:已收到
	 */
	public static final int RETURN_GOODS_STATUS_NOT_RECEIVED = 0;
	public static final int RETURN_GOODS_STATUS_NO_NEED_RETURN_GOODS = -1;
	public static final int RETURN_GOODS_STATUS_RECEIVED = 1;

	
    @Id
    @Column(name="refund_id")
    private Long refundId;

    /**
     * 订单id
     */
    @NotEmpty
    @Column(name="order_sn")
    private String orderSn;

    /**
     * 订单细览id
     */
    @NotEmpty
    @Column(name="order_item_id")
    private Long orderItemId;

    /**
     * 产品id
     */
    @NotEmpty
    @Column(name="goods_id")
    private Integer goodsId;

    /**
     * 商品规格id
     */
    @NotEmpty
    @Column(name="goods_spec_id")
    private Integer goodsSpecId;

    /**
     * 商品数量
     */
    @Column(name="goods_count")
    private Integer goodsCount;

    /**
     * 用户申请退款金额(分)
     */
    @Column(name="user_apply_amount")
    private Integer userApplyAmount;

    /**
     * 商家审核退款金额(分)
     */
    @Column(name="shop_check_amount")
    private Integer shopCheckAmount;

    /**
     * 申请退款原因
     */
    @Column(name="refund_reason")
    private String refundReason;

    /**
     * 退款类型 1:退款 - 买家申请退款; 2:退款 - 商家主动退款; 3:退款 - 一键退款
     */
    @Column(name="refund_type")
    private Integer refundType;

    /**
     * 方式:1：退货退款,2::仅退款
     */
    @Column(name="refund_way")
    private Integer refundWay;

    /**
     * 退款状态（ -10退款关闭 1:买家已经申请退款，等待卖家同意; 10:卖家拒绝退款; 20:卖家已经同意退货，等待买家退货; 30:买家已经退货，等待卖家确认收货; 40:卖家未收到货,拒绝退款; 50:退款关闭; 60:退款成功）
     */
    @Column(name="refund_status")
    private Integer refundStatus;

    /**
     * 收货状态（1：未收到货 2：已收到货）
     */
    @Column(name="refund_goods_status")
    private Integer refundGoodsStatus;

    /**
     * 退货说明
     */
    @Column(name="refund_note")
    private String refundNote;

    /**
     * 用户手机
     */
    @Column(name="user_mobile")
    private String userMobile;

    /**
     * 审核状态:0：未审核,-1：不同意,1:同意
     */
    @Column(name="check_status")
    private Integer checkStatus;

    /**
     * 平台仲裁状态:0：申请,-1：未申请,1:已处理
     */
    @Column(name="platform_check_status")
    private Integer platformCheckStatus;

    /**
     * 商家处理意见
     */
    @Column(name="shop_dispose_idea")
    private String shopDisposeIdea;

    /**
     * 退货状态:0：未收到,-1：不需退货,1:已收到
     */
    @Column(name="return_goods_status")
    private Integer returnGoodsStatus;

    /**
     * 平台仲裁意见
     */
    @Column(name="platform_dispose_idea")
    private String platformDisposeIdea;

    /**
     * 寄回收货人姓名
     */
    @Column(name="shop_deli_name")
    private String shopDeliName;

    /**
     * 寄回收货人联系电话
     */
    @Column(name="shop_deli_tel")
    private String shopDeliTel;

    /**
     * 寄回收货人详细地址
     */
    @Column(name="shop_deli_address")
    private String shopDeliAddress;

    /**
     * 收货人姓名
     */
    @Column(name="customer_deli_name")
    private String customerDeliName;

    /**
     * 收货人所在地:省
     */
    @Column(name="customer_deli_province")
    private String customerDeliProvince;

    /**
     * 收货人所在地:市
     */
    @Column(name="customer_deli_city")
    private String customerDeliCity;

    /**
     * 收货人所在地:区
     */
    @Column(name="customer_deli_district")
    private String customerDeliDistrict;

    /**
     * 收货人详细地址
     */
    @Column(name="customer_deli_address")
    private String customerDeliAddress;

    /**
     * 收货人联系电话
     */
    @Column(name="customer_deli_tel")
    private String customerDeliTel;

    /**
     * 退款银行名称
     */
    @Column(name="refund_bank_name")
    private String refundBankName;

    /**
     * 退款账号
     */
    @Column(name="refund_bank_account")
    private String refundBankAccount;

    /**
     * 开户人姓名
     */
    @Column(name="refund_account_name")
    private String refundAccountName;

    /**
     * 开户支行名称
     */
    @Column(name="refund_bank_branch")
    private String refundBankBranch;

    /**
     * 创建时间
     */
    @Column(name="create_time")
    private Date createTime;

    /**
     * 商家处理时间
     */
    @Column(name="shop_dispose_time")
    private Date shopDisposeTime;

    /**
     * 平台处理时间
     */
    @Column(name="platform_dispose_time")
    private Date platformDisposeTime;

    /**
     * 退款时间
     */
    @Column(name="refund_time")
    private Date refundTime;

    /**
     * 退款关闭时间
     */
    @Column(name="close_time")
    private Date closeTime;
    
    /**
     * 客户uid
     */
    @Column(name="user_id")
    private Long userId;

    /**
     * 用户登录名
     */
    @Column(name="user_name")
    private String userName;

    /**
     * 分平台id
     */
    @Column(name="platform_id")
    private String platformId;

    /**
     * 付款类型
     */
    @Column(name="pay_type")
    private Integer payType;
    
    /**
     * 店铺id
     */
    private Integer shopId;

    /**
     * 店铺名称
     */
    private String shopName;
    
	
	/**
	 * 产品图片
	 */
	private String goodsTitleImage;
	
	/**
	 * 产品名称
	 */
	private String goodsName;
	
	/**
	 * 商品标题(短)
	 */
	private String goodsSimpleTitle;
	
	/**
	 * 商品标题(长)
	 */
	private String goodsTitle;
	
	/**
	 * 产品规格名称
	 */
	private String goodsSpecName;
	
    /**
     * 商户ID
     */
    public Integer merchantId;
	
    private static final long serialVersionUID = 1L;
}